Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A collection of utilities to take your TypeScript development up a notch
You can cherry-pick what you import
Make sure two types are identical
Playground
A assertion function that typescript understands
Make sure your zod schema exactly matches a given type:
Playground
Make sure you never forget a case in a switch
Playground
Make TypeScript believe whatever you say without having to write const obj2 = obj as Bar
.
The more powerfully is to be able to tell TypeScript that obj
ist not of type Bar
:
Powerful TypeScript features like assertion functions or user-defined type guards are only useful if paired with utility functions.
TypeScript, however, only exports type helpers (e.g. Record
, ReturnType
, etc.).
This module provides «the missing builtins» such as the assert function and other utilities that cannot be just type helpers.
tsafe
is both an NPM and a Deno module.
(Achieved with denoify)
import { assert, type Equals, ... } from "https://deno.land/x/tsafe/mod.ts";
$ npm install --save tsafe
FAQs
A collection of utilities to step up your TypeScript game
We found that tsafe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.